package io.gitee.zhangbinhub.acp.boot

import io.gitee.zhangbinhub.acp.boot.init.AcpInitialization
import io.gitee.zhangbinhub.acp.boot.listener.AcpApplicationStartupListener
import io.gitee.zhangbinhub.acp.boot.listener.AcpApplicationStopListener
import io.gitee.zhangbinhub.acp.boot.log.LogAdapter
import org.noear.solon.annotation.Bean
import org.noear.solon.annotation.Configuration
import org.noear.solon.annotation.Inject

@Configuration
class AcpBootSetUpAutoConfiguration {
    @Bean
    fun acpApplicationStartupListener(
        @Inject logAdapter: LogAdapter,
        @Inject initializationList: MutableList<AcpInitialization>
    ) = AcpApplicationStartupListener(logAdapter, initializationList)

    @Bean
    fun acpApplicationStopListener(): AcpApplicationStopListener = AcpApplicationStopListener()
}